package com.itheima.demo;


import lombok.Data;

//家电
@Data
public class HouseholdAppliance implements HouseholdApplianceStatus{
    private String name;
    //状态：开或者关；
    private boolean status; //false 默认为关
    public HouseholdAppliance(String name, boolean status) {
        this.name = name;
        this.status = status;
    }
    @Override
    public void SwitchStatus() {
        status = !status;
    }

}
